package com.cyys.modules.system.controller.doc;

import com.cyys.modules.core.controller.BaseAction;
import com.cyys.modules.core.sysParam.SystemConfigureUtil;
import com.cyys.modules.core.sysParam.SystemConstants;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/sys/doc")
public class DocAction extends BaseAction {


    /**
     * 访问前台API
     * @return
     */
    @GetMapping("/getRestApi")
    public String getRestApi() {
        String restApi = SystemConfigureUtil.get(SystemConstants.REST_API_ADDRESS);
        return "redirect:" + restApi;
    }

    /**
     * 示例页面
     * @return
     */
    @GetMapping("/examples/input")
    public String examples() {
        return "module/examples/js-input";
    }

}
